package com.IntelligentCommunity.deploy.api.factory;

import com.IntelligentCommunity.common.core.domain.R;
import com.IntelligentCommunity.deploy.api.WebSocketRemote;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @author 美国五星上将麦克阿瑟
 */
@Component
public class WebSocketFallbackFactory implements FallbackFactory<WebSocketRemote> {
    @Override
    public WebSocketRemote create(Throwable cause) {
        return new WebSocketRemote() {
            @Override
            public R sendWran(String message) {
                return R.fail();
            }
        };
    }
}
